package org.wdh.extend.visitor;

import java.io.OutputStream;

public class TreePrinter2 extends TreePrinter implements TreeVisitor2 {

	public TreePrinter2(int _amountOfIndentation, OutputStream _out) {
		super(_amountOfIndentation, _out);
	}

	TreePrinter newTree(int _amountOfIndentation, OutputStream _out) {
		return new TreePrinter2(_amountOfIndentation, _out);
	}

	public Object forNonEmptyLeaf(NonEmptyLeaf that) {
		this.indent();
		this.out.println(that.getValue());
		// Returns a dummy object to satisfy TreeVisitor interface.
		return new Object();
	}
}
